#include "imagelistmodel.h"

int ImageListModel::rowCount(const QModelIndex &parent) const
{
    Q_UNUSED(parent);
    return m_imageList.count();
}

QVariant ImageListModel::data(const QModelIndex &index, int role) const
{
    if (!index.isValid())
        return QVariant();

    if (!index.row() >= m_imageList.size())
        return QVariant();

    if (role == Qt::DecorationRole)
        return m_imageList.at(index.row());
    else
        return QVariant();
}

ImageListModel::~ImageListModel()
{

}

